Skip to content

Drop the legacy experiment_design.csv migration (PP-03) - #274

Merged
guijacquemet merged 4 commits into
mainfrom
claude/drop-legacy-migration
Nov 10, 2026
Merged

guijacquemet merged 4 commits into
mainfrom
claude/drop-legacy-migration

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

What

Removes the one-way migration of a legacy experiment_design.csv into a draft (inventory row PP-03), following MorphoBricks-Spec PR 25 (merged 542c936; ADR 0002 AR10 (9), experiment-v1 §7/§11/§12, conformance P30). Preprocessing never reads an output-folder experiment_design.csv to propose or prefill a draft or description. The derived file stays an output.

Changes

  • Re-vendor the Spec at cc9820f5b84f01bbbb5c8e3f54e70ee13cb5e9eb with the Spec's tools/vendor.py; --check: "identical to the Spec at its pinned commit". PIN.toml updated by the tool; draft_format.SPEC_COMMIT follows the pin (an answers draft saved under 1bed024 is refused as before, spec_commit_mismatch). The tool also rewrote tests/spec_fixtures/README.md in its standard form.
  • Removed (draft.py, about 165 lines): migrate_legacy_design, LegacyMigrationRefused, MigrationNote, _check_legacy_rules (and _probe, _legacy_groups, PLACEHOLDER_DATE, used only by it), Draft.origin, Draft.legacy_missing, Draft.notes, and Draft.unresolved_controls with the control_unresolved question (only the migration produced it). The legacy_folder_missing question and its texts in cli_describe.py and notebook_check_view.py; the describe "cannot be drafted from experiment_design.csv" branch; docstring mentions in draft_answers.py and run/draft_file.py. Notebook files: removals of two text-table lines only.
  • Kept: design.parse_design_bytes and design_issues. design_issues is the run's reconcile check. parse_design_bytes has no src/ caller left but is exported and is the strict reader of the written file in test_design, test_design_file, test_spec_derived_design and test_dataset; docstrings now say so. Say if you want it removed with those tests.
  • Tests: P30 (test_spec_derived_design) follows the amended Spec: v13 derived twice with a frozen clock moved by a day, both equal the v13 golden, every row carries its repeat's confirmed_on, clock reads 0. Deleted the migration tests (11 in test_draft.py, 3 in test_cli_describe.py, 1 in test_draft_answers.py). Added tests/test_orphan_design_csv.py and a test_cli_describe case: an orphan experiment_design.csv in the output folder (confirmed repeats, a control, odd groups, or a malformed file) is ignored by draft creation, describe (with and without --publish; output unchanged, file untouched) and the notebook (open and reopen).
  • Docs: user guide, contract, AGENTS.md map, conformance P30 row (marked amended; the dated run record is not relabelled), CHANGELOG Unreleased "Breaking".

Verification

  • python tools/check.py: ruff, format, code rules and pytest: 5150 passed, 4 skipped, 0 failed. The 4 skips are environmental (case-insensitive file system x3, file-mode permissions x1), none in test_spec_*.
  • Evidence, main (a87f524) against this branch on the same vendored Spec fixtures: 37 valid fixtures run through run_experiment: 31 written, 6 refused identically on both (v04, v05, v06, v17, v28, v29: the test tree helper does not build their layouts). plane_histograms.csv, experiment_design.csv and the manifest minus time keys are byte-identical (SHA-256) for all. The refusal codes of the 135 invalid fixtures are unchanged. Result files: JSON of both runs compared equal.

Not changed

Another agent's claude/redesign-* notebook branches: no notebook UI file is touched beyond the two removed text-table lines.


Generated by Claude Code

Spec ADR 0002 AR10 (9) and experiment-v1 section 7 (MorphoBricks-Spec PR 25): an
experiment_design.csv in an output folder is never read to propose or prefill a draft.

- Re-vendor the Spec at cc9820f with tools/vendor.py (--check identical); SPEC_COMMIT follows.
- Remove migrate_legacy_design, LegacyMigrationRefused, MigrationNote, the legacy rule check,
  Draft.origin/legacy_missing/notes/unresolved_controls, the legacy_folder_missing and
  control_unresolved questions, and their sites in describe and the notebook text table.
- Keep parse_design_bytes and design_issues (the written file's tests and the run's check use them).
- P30 follows the amended Spec; migration tests deleted; add tests that an orphan
  experiment_design.csv is ignored by draft creation, describe and the notebook.
- Docs and CHANGELOG (Breaking).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc

# Conflicts:
#	CHANGELOG.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
@guijacquemet
guijacquemet merged commit f71e62f into main Nov 10, 2026
7 checks passed
@guijacquemet
guijacquemet deleted the claude/drop-legacy-migration branch November 10, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants